<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>tt</title>

    <!--
我们可以使用 v-model 指令在状态和表单输入之间创建双向绑定。
-->
    <script type="importmap">
    {
        "imports": {
          "vue": "./vue.esm-browser.prod.js"
        },
        "scopes": {}
      }
  </script>


    <!--
这个示例展示了如何通过 v-on 指令处理用户输入。
-->

    <script type="module">
        import { createApp, ref } from 'vue'
        import pageA from './compt/pageA.js'

        createApp({
            components(){
                pageA3
            },
            setup() {
                const message = ref('Hello World!')

                function createWindow() {
                    const { remote } = window.require("electron");
                    console.log(remote)
                    let BrowserWindow = remote.BrowserWindow

                    const mainWindow = new BrowserWindow({
                        width: 1000,
                        height: 600,
                        webPreferences: {
                            enableRemoteModule: true,
                            nodeIntegration: true,
                            contextIsolation: false,
                            webSecurity: false,
                        }
                    })
                    mainWindow.loadFile('pages/index.html')
                    //mainWindow.webContents.openDevTools({mode:'right'})//undocked detach
                }

                function opennew() {
                    createWindow()
                }

                return {
                    message,
                    opennew
                }
            }
        }).mount('#app')
    </script>
</head>

<body>
    <div id="app">
        <button @click="opennew">打开新窗口</button>

        <hr/>
        <div >
            <button @click="">菜单1</button>
            <button @click="">菜单2</button>

        </div>
        <hr/>
        <page-a todo="lsdfklsdf"></page-a>
        <div v-if="selectMenu ==1">
            
        </div>

    </div>
</body>

</html>